//
//  Tipe_WX_VC.m
//  ZITHER
//
//  Created by weixin on 2019/5/13.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Tipe_WX_VC.h"
#import "Tipe_WX_View.h"
#import "Tipe_SCR_WX.h"
#import "Tipe_Model_WX.h"


@interface Tipe_WX_VC ()
@property (nonatomic,strong)BaseLab * labLike;
@property (nonatomic,strong)BaseLab * labTrips;
@property (nonatomic,strong)Tipe_WX_View * TipeView;
@property (nonatomic,strong)Tipe_SCR_WX * TipeSCR;


@end

@implementation Tipe_WX_VC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setNav];
    [self setUI];
    [self setMasonry];
    [self setData];

}

-(void)setUI{
    
    [self.view addSubview:self.labLike];
    [self.view addSubview:self.labTrips];
    [self.view addSubview:self.TipeView];
    [self.view addSubview:self.TipeSCR];
    
}

-(void)setData{
    //快速拍照识别 快速录视频上传 快速查表 快速去到某个品牌如@“劳力士“ 快速发布
    NSArray* TtileArr = @[@"快速查表",@"劳力士",@"快速发布求助",@"拍照识别",@"录视频上传你的手表参数"];
    NSArray* TtileSubArr = @[@"快速通过参数筛选，获取手表信息",
                             @"热门品牌搜索",
                             @"发布求助，获得社区好友的帮助",@"上传手表图片自动帮你识别相关手表",
                             @"我们会对你上传视频优化我们后台算法让识别更准"];
    NSArray* BtnTitleArr = @[@"参数查询",@"品牌相关",@"社区求助",@"拍照识别",@"上传视频"];
    NSArray* imgaeUrlArr = @[@"3temp",@"4temp",@"5temp",@"1temp",@"2temp"];
    
    NSMutableArray *arrM = [[NSMutableArray alloc]init];
    for (int i = 0; i<TtileArr.count; i++) {
        Tipe_Model_WX *model = [[Tipe_Model_WX alloc]init];
        model.Ttile = TtileArr[i];
        model.TtileSub = TtileSubArr[i];
        model.BtnTitle = BtnTitleArr[i];
        model.imgaeUrl = imgaeUrlArr[i];
        [arrM addObject:model];
    }
    self.TipeSCR.arr = arrM;
    self.TipeView.arr = arrM;

}

-(void)setMasonry{
    @weakify(self);
    [self.labLike mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self);
        make.left.equalTo(self.view).offset(15);
        make.top.equalTo(self.view).offset(NaviHeight);
        make.height.mas_equalTo(15);
    }];
    
    [self.labTrips mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self);
        make.left.equalTo(self.view).offset(15);
        make.top.equalTo(self.view).offset(250+NaviHeight);
        make.height.mas_equalTo(15);
    }];
    
    [self.TipeView mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self);
        make.left.equalTo(self.view).offset(15);
        make.right.equalTo(self.view).offset(-15);
        make.top.equalTo(self.labTrips.mas_bottom).offset(20);
        make.bottom.equalTo(self.view.mas_bottom).offset(-TabbarHeight-20);
    }];
    
    [self.TipeSCR mas_makeConstraints:^(MASConstraintMaker *make) {
        @strongify(self);
        make.left.equalTo(self.view).offset(15);
        make.right.equalTo(self.view).offset(-15);
        make.top.equalTo(self.labLike.mas_bottom).offset(20);
        make.bottom.equalTo(self.labTrips.mas_top).offset(-40);
    }];
    
    
}

-(void)setNav{
    [self.baseNavigationView setHiddenNav:YES VC:self];
}

-(BaseLab *)labLike{
    if (!_labLike) {
        _labLike = [BaseLab initCustomLab:@"常用" color:Main_Token_Model_MANAGER.backgroundColor font:[UIFont fontWithName:@"PingFang-SC-Regular" size:15]];
    }
    return _labLike;
}

-(BaseLab *)labTrips{
    if (!_labTrips) {
        _labTrips = [BaseLab initCustomLab:@"手表识别" color:Main_Token_Model_MANAGER.backgroundColor font:[UIFont fontWithName:@"PingFang-SC-Regular" size:15]];
    }
    return _labTrips;
}

-(Tipe_WX_View *)TipeView{
    if (!_TipeView) {
        _TipeView = [[Tipe_WX_View alloc]init];
    }
    return _TipeView;
}
-(Tipe_SCR_WX *)TipeSCR{
    if (!_TipeSCR) {
        _TipeSCR = [[Tipe_SCR_WX alloc]init];
    }
    return _TipeSCR;
}

@end
